package main

import "fmt"

func ssss() {
	a := 10
	b := 20
	c := 30
	//创建指针数组
	var arr [3]*int = [3]*int{&a, &b, &c}
	fmt.Println(arr)
	//修改变量
	*arr[1] = 100
	fmt.Println(b)
	//循环取出所有变量
	for i := 0; i < len(arr); i++ {
		fmt.Println(*arr[i])

	}
}
func main() {
	a := [3]int{1, 2, 3}
	b := [3]int{4, 5, 6}
	c := [3]int{7, 8, 9}
	var arr [3]*[3]int = [3]*[3]int{&a, &b, &c}
	fmt.Println(arr)
	(arr[1])[1] = 100
	fmt.Println(b)
	ssss()
}
